/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* ===== SECTION ===== */
.facilities {
  padding: 60px 20px;
  background: #f5f7fa;
  text-align: center;
}

.facilities h2 {
  font-size: 34px;
  color: black;
  margin-bottom: 40px;
  position: relative;
  display: inline-block;
}

/* Heading underline animation */
.facilities h2::after {
  content: "";
  width: 0;
  height: 3px;
  background: #ff6600;
  position: absolute;
  left: 0;
  bottom: -10px;
  transition: 0.4s;
}

.facilities h2:hover::after {
  width: 100%;
}

/* ===== GRID ===== */
.facility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

/* ===== CARD ===== */
.facility-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: 0.4s;
  transform: translateY(40px);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

/* Hover effect */
.facility-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

/* ===== IMAGE ===== */
.img-box {
  overflow: hidden;
}

.img-box img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: 0.4s;
}

/* Zoom image */
.facility-card:hover img {
  transform: scale(1.05);
}

/* ===== TEXT BELOW IMAGE ===== */
.overlay {
  position: static;
  background: #ffffff;
  color: #333;
  padding: 20px;
  text-align: left;
}

/* Title */
.overlay h3 {
  color: #0b2e59;
  margin-bottom: 10px;
  font-size: 20px;
}

/* List */
.overlay ul {
  padding-left: 18px;
}

.overlay ul li {
  font-size: 14px;
  margin-bottom: 6px;
  line-height: 1.5;
}

/* ===== ANIMATION ===== */
@keyframes fadeUp {
  0% {
    transform: translateY(40px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Delay animation for each card */
.facility-card:nth-child(1) { animation-delay: 0.1s; }
.facility-card:nth-child(2) { animation-delay: 0.2s; }
.facility-card:nth-child(3) { animation-delay: 0.3s; }
.facility-card:nth-child(4) { animation-delay: 0.4s; }
.facility-card:nth-child(5) { animation-delay: 0.5s; }
.facility-card:nth-child(6) { animation-delay: 0.6s; }
.facility-card:nth-child(7) { animation-delay: 0.7s; }
.facility-card:nth-child(8) { animation-delay: 0.8s; }
.facility-card:nth-child(9) { animation-delay: 0.9s; }
.facility-card:nth-child(10) { animation-delay: 1s; }
.facility-card:nth-child(11) { animation-delay: 1.1s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .facilities h2 {
    font-size: 26px;
  }

  .img-box img {
    height: 180px;
  }
}